home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / tcp_ip / ka9q / kit_src / wrbiosch.c < prev   
Encoding:
C/C++ Source or Header  |  1992-09-03  |  1.2 KB  |  35 lines

  1. /*    (C) Copyright 1991 Dave Fritsche (wb8zxu), All Rights Reserved.
  2.  * 
  3.  *    Redistribution and use in source and binary forms are permitted for
  4.  *    non-commercial use, provided that the above copyright notice and this
  5.  *    paragraph are duplicated in all such forms.  THIS SOFTWARE IS PROVIDED
  6.  *    ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
  7.  *    WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  8.  *    FITNESS FOR A PARTICULAR PURPOSE.
  9.  */
  10. #include <dos.h>
  11. #include <stdio.h>
  12.  
  13. #define VIDEO_IO    0x10        /* bios interrupt for video fcns */
  14. #define WCHARA        0x09        /* write a char and attribute */
  15. #define SETPOS        0x02        /* set cursor position */
  16.  
  17. wrbiosch(r, c, ch, nch, attr)
  18. int r, c, ch, nch, attr;
  19. {
  20.     union REGS in_regs, out_regs;
  21.  
  22.     in_regs.h.ah = SETPOS;
  23.     in_regs.h.bh = 0;            /* display page */
  24.     in_regs.h.dh = r;            /* row */
  25.     in_regs.h.dl = c;            /* column */
  26.     int86(VIDEO_IO, &in_regs, &out_regs);    /* set cursor position */
  27.  
  28.     in_regs.h.ah = WCHARA;            /* video service */
  29.     in_regs.h.bh = 0;            /* active page # */
  30.     in_regs.h.al = ch;            /* char to write */
  31.     in_regs.x.cx = nch;            /* # chars to write */
  32.     in_regs.h.bl = attr;            /* attribute */
  33.     int86(VIDEO_IO, &in_regs, &out_regs);    /* write char & attribute */
  34. }
  35.